﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;

namespace HttpCrawler
{
    public static class ConcurrentQueueExtensions
    {
        public static void Enqueue<TKey, TValue>(this ConcurrentQueue<KeyValuePair<TKey, TValue>> queue, TKey key, TValue value)
        {
            if (queue == null)
            {
                throw new ArgumentNullException("queue");
            }

            queue.Enqueue(new KeyValuePair<TKey, TValue>(key, value));
        }
    }
}
